﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<System.Collections.Generic.List<hercules.Models.ProdutoModel>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    SearchIndex
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<h2>SearchIndex</h2>

<p>
    <%: Html.ActionLink("Create New", "Create") %>
    
    <% using (Html.BeginForm())
       { %>
            <p> Title <%: Html.TextBox("nomeProduto") %> <br/>
                <input type="submit" value="Filter"/></p>
    <% } 
    %>
</p>
<table>
    <tr>
        <th>
            codigoBarra
        </th>
        <th>
            naturezaCFOP
        </th>
        <th>
            nome
        </th>
        <th>
            apelido
        </th>
        <th>
            ncm
        </th>
        <th>
            precoNota
        </th>
        <th>
            precoReal
        </th>
        <th>
            ipi
        </th>
        <th>
            unidade
        </th>
        <th>
            icms
        </th>
        <th>
            precoVenda
        </th>
        <th>
            descontoMaximo
        </th>
        <th>
            dataVencimento
        </th>
        <th>
            lote
        </th>
        <th></th>
    </tr>

<% foreach (var item in Model) { %>
    <tr>
        <td>
            <%: Html.DisplayFor(modelItem => item.CodigoBarra) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.NaturezaCFOP) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.Nome) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.Apelido) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.Ncm) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.PrecoNota) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.PrecoReal) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.Ipi) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.Unidade) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.Icms) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.PrecoVenda) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.DescontoMaximo) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.DataVencimento) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.Lote) %>
        </td>
        <td>
            <%: Html.ActionLink("Edit", "Edit", new { id=item.IdProduto }) %> |
            <%: Html.ActionLink("Details", "Details", new { id=item.IdProduto }) %> |
            <%: Html.ActionLink("Delete", "Delete", new { id=item.IdProduto }) %>
        </td>
    </tr>
<% } %>

</table>

</asp:Content>
